-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error if PAuth language features are used on unsupported CPU #66
Conversation
Looks like |
As far as I can see, it is Clang driver that sets the per-triple default CPU and features, but
I plan implementing the second variant (add target-feature / target-cpu to existing tests). This seems safer than the first option (less probability of accidentally disabling pointer authentication). |
@atrosinenko I think everything should be done in driver. Tests are likely to be fixed. |
Sorry, this seems to be incorrect: both choosing the default CPU/features and
(i.e. those enabling ptrauth and not involving actual code generation either in assembler or object file form). Several tests still have to be fixed. Maybe it is better to check for unsupported options in the driver instead. This should eliminate |
A few notes:
|
llvm/llvm-project#78027 is the mainline PR that should replace 24048e1 commit in this PR. |
Addressed the comments, except for using a more generic triple in the test. A few weeks ago I saw a Discourse thread on "generic vs. precise triples" - obviously "the more triples tested the better", but I cannot remember whether that was an argument for using generic triples or for picking an arbitrary triple that is the most familiar for the particular developer... I guess that it is better to have as precise triple as possible (even though arbitrarily chosen at commit time) for better reproducibility. Links to coding standards and Discourse threads are welcome. Note: after all review comments would be ultimately addressed, I would like to manually squash and rebase, so that the commit that sets |
Once again, addressed everything except target triples :) Thanks for the link - I will update the test after a bit more research. |
Changed the cases that do not rely on features not being implicitly enabled to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Check for several -fptrauth-* language features that require CPU with FEAT_PAuth support. If such unsupported feature is requested, make Clang frontend print error and exit early.
eb62a64
to
1f7f0c7
Compare
Dropped the commit that sets |
Check for several -fptrauth-* language features that require CPU with FEAT_PAuth support. If such unsupported feature is requested, make Clang frontend print error and exit early.